<div class="panel panel-default" ng-controller="RecipientCtrl">
	<div class="panel-heading">系统管理 / 发送系统公告 / 收件人选择</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderNo" class="form-control" placeholder="订单编号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__contactName"
						class="form-control" placeholder="联系人姓名">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__contactPhone"
						class="form-control" placeholder="联系人手机号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="statusList.selected" theme="bootstrap">
						<ui-select-match placeholder="订单状态">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices
							repeat="status in statusList | propsFilter: {name: $select.search}">
						<span ng-bind-html=" status.name| highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
						<span class="input-group-btn">
							<button ng-click="statusList.selected = undefined"
								class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control"
							datepicker-popup="{{format}}" is-open="opened"
							ng-model="timeRange.startTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="订单开始时间" readOnly /> <span
							class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control"
							datepicker-popup="{{format}}" is-open="opened"
							ng-model="timeRange.endTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="订单结束时间" readOnly /> <span
							class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>	
			<div class="form-group col-md-3" ng-if="type==1||type==3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.orderDetail__shiftNo"
						class="form-control" placeholder="班次号">
				</div>
			</div>		
			<div class="form-group col-md-1">
				<div class="col-md-1">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<p style="margin-left: 20px">说明：请勾选需要发送消息的订单，支持翻页勾选，勾选完毕后点击右侧的发送消息图标。（若勾选的订单中的乘客重复，系统会自动过滤，同一个乘客只会发送一条消息）</p>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width: 10px;"><label class="i-checks m-b-none" >
							<input type="checkbox"  ng-model="ckAll"
							ng-click="checkAll(ckAll,dataList)"><i></i>
					</label></th>
					<th>订单编号</th>
					<th>联系人</th>
					<th>联系人手机号</th>
					<th>订单总金额</th>
					<th>应付金额</th>
					<th>订单生成时间</th>
					<th>状态</th>
					<th style="width: 50px;">
						<a href tooltip="发送消息"><i class="fa fa-paper-plane-o" ng-click="send()"></i></a>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="order in dataList">
					<td><label class="i-checks m-b-none" > <input
							id="{{order.id}}" name="checks" type="checkbox" ng-checked="ckAll"
							ng-model="checks" ng-click="check(order)" value="{{order.id}}"><i></i>
					</label></td>
					<td>{{order.orderNo}}</td>
					<td ng-if="order.type==1">{{order.orderDetail.contactName}}</td>
					<td ng-if="order.type==1">{{order.orderDetail.contactPhone}}</td>
					<td ng-if="order.type!=1">{{order.contactName}}</td>
					<td ng-if="order.type!=1">{{order.contactPhone}}</td>					
					<td>{{order.totalPrice |number:2}}</td>
					<td>{{order.payablePrice |number:2}}</td>
					<td>{{order.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
					<td>{{order.status | orderFilter}}</td>
					<td>
						<div class="row list-icon">
							<a href  ng-if="type==1"  tooltip="详情" ui-sref="app.booking.detail({orderId: order.id,status: order.status,tag:3,id:0})"  target="_blank"><i class="fa icon-info"></i></a>
							<a href  ng-if="type==2" tooltip="详情" ui-sref="app.rent.detail({orderId: order.id,status: order.status,tag:3})" target="_blank"><i class="fa icon-info" ></i></a>
							<a href  ng-if="type==3" tooltip="详情" ui-sref="app.bus.detail({orderId: order.id,status: order.status,tag:3})" target="_blank"><i class="fa icon-info" ></i></a>
						</div>					
					</td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="9" style="text-align: center;">暂无订单信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>